<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">
	
<h:head>
	<link type="text/css" href="./generalstyle.css" rel="stylesheet"/>
	
</h:head>
<h:body>
      
    
    <h:form>
		<p:panel header="Login"  style="width:600px; margin:0 auto; text-align:center;">
			<h:panelGrid columns="3" id="regGrid">

				<h:outputLabel for="username">User Name:</h:outputLabel>
				<p:inputText id="username" requiredMessage="Campo obbligatorio"
					value="#{loginBean.username}" required="true" />
				<p:message for="username" />

				<h:outputLabel for="password">Password:</h:outputLabel>
				<p:password id="password" requiredMessage="Campo obbligatorio"
					value="#{loginBean.password}" required="true" />
				<p:message for="password" />

			</h:panelGrid>

			<p:commandButton value="Login" update="regGrid"
				action="#{loginBean.login}" />
			<p:button outcome="./registrazione.xhtml" value="Registrazione" />
			<p:button outcome="./home.xhtml" value="Home"/>
				

		</p:panel>
		
			
		
	</h:form>
    
    
</h:body>
</html>